package com.exam.system.controller;

import com.exam.system.dao.ExamTagsDao;
import com.exam.system.entity.ExamTags;
import com.exam.system.entity.QuestionOption;
import com.exam.system.entity.ResponseEntity;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@CrossOrigin
@RequestMapping("/tags/")
public class ExamTagsController {
    @Autowired
    ExamTagsDao examTagsDao;

    @ApiOperation(value = "查找所有标签")
    @GetMapping("findAll")
    public ResponseEntity<List<ExamTags>> findAll(){
        List<ExamTags> tags = examTagsDao.findAll();
        ResponseEntity<List<ExamTags>> responseEntity=new ResponseEntity<>(200,"success",tags);
       return   responseEntity;
    }
}
